/*
 * @Author: DUST
 * @Date: 2023-06-09 13:44:05
 * @LastEditors: DUST
 * @LastEditTime: 2023-06-09 13:44:05
 * @FilePath: \vite-project\src\store\router.ts
 * @Description: 
 * undefined
 */

import { defineStore } from "pinia";
import store from ".";

interface State {
  lastPath: string | undefined
}

const routerStore = defineStore("routerStore",{
  state: (): State => ({
    lastPath: undefined
  }),
  persist: {
    enabled: true
  },
  actions: {
    setLastPath(lastPath: string) {
      this.lastPath = lastPath;
    }
  }
})

export default routerStore(store);